<?php include_once "usuariosinfo.php" ?>
<?php

// Create page object
if (!isset($solicituddetalle_grid)) $solicituddetalle_grid = new csolicituddetalle_grid();

// Page init
$solicituddetalle_grid->Page_Init();

// Page main
$solicituddetalle_grid->Page_Main();

// Global Page Rendering event (in userfn*.php)
Page_Rendering();

// Page Rendering event
$solicituddetalle_grid->Page_Render();
?>
<?php if ($solicituddetalle->Export == "") { ?>
<script type="text/javascript">

// Page object
var solicituddetalle_grid = new ew_Page("solicituddetalle_grid");
solicituddetalle_grid.PageID = "grid"; // Page ID
var EW_PAGE_ID = solicituddetalle_grid.PageID; // For backward compatibility

// Form object
var fsolicituddetallegrid = new ew_Form("fsolicituddetallegrid");
fsolicituddetallegrid.FormKeyCountName = '<?php echo $solicituddetalle_grid->FormKeyCountName ?>';

// Validate form
fsolicituddetallegrid.Validate = function() {
	if (!this.ValidateRequired)
		return true; // Ignore validation
	var $ = jQuery, fobj = this.GetForm(), $fobj = $(fobj);
	this.PostAutoSuggest();
	if ($fobj.find("#a_confirm").val() == "F")
		return true;
	var elm, felm, uelm, addcnt = 0;
	var $k = $fobj.find("#" + this.FormKeyCountName); // Get key_count
	var rowcnt = ($k[0]) ? parseInt($k.val(), 10) : 1;
	var startcnt = (rowcnt == 0) ? 0 : 1; // Check rowcnt == 0 => Inline-Add
	var gridinsert = $fobj.find("#a_list").val() == "gridinsert";
	for (var i = startcnt; i <= rowcnt; i++) {
		var infix = ($k[0]) ? String(i) : "";
		$fobj.data("rowindex", infix);
		var checkrow = (gridinsert) ? !this.EmptyRow(infix) : true;
		if (checkrow) {
			addcnt++;
			elm = this.GetElements("x" + infix + "_detalleSolicitud");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($solicituddetalle->detalleSolicitud->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_detalleItem");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($solicituddetalle->detalleItem->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_detalleUnidades");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($solicituddetalle->detalleUnidades->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_detalleMetros");
			if (elm && !ew_CheckNumber(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($solicituddetalle->detalleMetros->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_detallePallets");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($solicituddetalle->detallePallets->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_detallePaquetes");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($solicituddetalle->detallePaquetes->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_detallePunto");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($solicituddetalle->detallePunto->FldErrMsg()) ?>");
			elm = this.GetElements("x" + infix + "_detalleNumero");
			if (elm && !ew_CheckInteger(elm.value))
				return this.OnError(elm, "<?php echo ew_JsEncode2($solicituddetalle->detalleNumero->FldErrMsg()) ?>");

			// Set up row object
			ew_ElementsToRow(fobj);

			// Fire Form_CustomValidate event
			if (!this.Form_CustomValidate(fobj))
				return false;
		} // End Grid Add checking
	}
	return true;
}

// Check empty row
fsolicituddetallegrid.EmptyRow = function(infix) {
	var fobj = this.Form;
	if (ew_ValueChanged(fobj, infix, "detalleSolicitud", false)) return false;
	if (ew_ValueChanged(fobj, infix, "detalleItem", false)) return false;
	if (ew_ValueChanged(fobj, infix, "detalleProducto", false)) return false;
	if (ew_ValueChanged(fobj, infix, "detalleUnidades", false)) return false;
	if (ew_ValueChanged(fobj, infix, "detalleMetros", false)) return false;
	if (ew_ValueChanged(fobj, infix, "detallePallets", false)) return false;
	if (ew_ValueChanged(fobj, infix, "detallePaquetes", false)) return false;
	if (ew_ValueChanged(fobj, infix, "detalleTipo", false)) return false;
	if (ew_ValueChanged(fobj, infix, "detallePunto", false)) return false;
	if (ew_ValueChanged(fobj, infix, "detalleNumero", false)) return false;
	return true;
}

// Form_CustomValidate event
fsolicituddetallegrid.Form_CustomValidate = 
 function(fobj) { // DO NOT CHANGE THIS LINE!

 	// Your custom validation code here, return false if invalid. 
 	return true;
 }

// Use JavaScript validation or not
<?php if (EW_CLIENT_VALIDATE) { ?>
fsolicituddetallegrid.ValidateRequired = true;
<?php } else { ?>
fsolicituddetallegrid.ValidateRequired = false; 
<?php } ?>

// Dynamic selection lists
fsolicituddetallegrid.Lists["x_detalleProducto"] = {"LinkField":"x_productosCodigo","Ajax":null,"AutoFill":false,"DisplayFields":["x_productosCodigo","x_productosNombre","",""],"ParentFields":[],"FilterFields":[],"Options":[]};

// Form object for search
</script>
<?php } ?>
<?php if ($solicituddetalle->getCurrentMasterTable() == "" && $solicituddetalle_grid->ExportOptions->Visible()) { ?>
<div class="ewListExportOptions"><?php $solicituddetalle_grid->ExportOptions->Render("body") ?></div>
<?php } ?>
<?php
if ($solicituddetalle->CurrentAction == "gridadd") {
	if ($solicituddetalle->CurrentMode == "copy") {
		$bSelectLimit = EW_SELECT_LIMIT;
		if ($bSelectLimit) {
			$solicituddetalle_grid->TotalRecs = $solicituddetalle->SelectRecordCount();
			$solicituddetalle_grid->Recordset = $solicituddetalle_grid->LoadRecordset($solicituddetalle_grid->StartRec-1, $solicituddetalle_grid->DisplayRecs);
		} else {
			if ($solicituddetalle_grid->Recordset = $solicituddetalle_grid->LoadRecordset())
				$solicituddetalle_grid->TotalRecs = $solicituddetalle_grid->Recordset->RecordCount();
		}
		$solicituddetalle_grid->StartRec = 1;
		$solicituddetalle_grid->DisplayRecs = $solicituddetalle_grid->TotalRecs;
	} else {
		$solicituddetalle->CurrentFilter = "0=1";
		$solicituddetalle_grid->StartRec = 1;
		$solicituddetalle_grid->DisplayRecs = $solicituddetalle->GridAddRowCount;
	}
	$solicituddetalle_grid->TotalRecs = $solicituddetalle_grid->DisplayRecs;
	$solicituddetalle_grid->StopRec = $solicituddetalle_grid->DisplayRecs;
} else {
	$bSelectLimit = EW_SELECT_LIMIT;
	if ($bSelectLimit) {
		$solicituddetalle_grid->TotalRecs = $solicituddetalle->SelectRecordCount();
	} else {
		if ($solicituddetalle_grid->Recordset = $solicituddetalle_grid->LoadRecordset())
			$solicituddetalle_grid->TotalRecs = $solicituddetalle_grid->Recordset->RecordCount();
	}
	$solicituddetalle_grid->StartRec = 1;
	$solicituddetalle_grid->DisplayRecs = $solicituddetalle_grid->TotalRecs; // Display all records
	if ($bSelectLimit)
		$solicituddetalle_grid->Recordset = $solicituddetalle_grid->LoadRecordset($solicituddetalle_grid->StartRec-1, $solicituddetalle_grid->DisplayRecs);
}
$solicituddetalle_grid->RenderOtherOptions();
?>
<?php $solicituddetalle_grid->ShowPageHeader(); ?>
<?php
$solicituddetalle_grid->ShowMessage();
?>
<table class="ewGrid"><tr><td class="ewGridContent">
<div id="fsolicituddetallegrid" class="ewForm form-horizontal">
<div id="gmp_solicituddetalle" class="ewGridMiddlePanel">
<table id="tbl_solicituddetallegrid" class="ewTable ewTableSeparate">
<?php echo $solicituddetalle->TableCustomInnerHtml ?>
<thead><!-- Table header -->
	<tr class="ewTableHeader">
<?php

// Render list options
$solicituddetalle_grid->RenderListOptions();

// Render list options (header, left)
$solicituddetalle_grid->ListOptions->Render("header", "left");
?>
<?php if ($solicituddetalle->detalleSolicitud->Visible) { // detalleSolicitud ?>
	<?php if ($solicituddetalle->SortUrl($solicituddetalle->detalleSolicitud) == "") { ?>
		<td><div id="elh_solicituddetalle_detalleSolicitud" class="solicituddetalle_detalleSolicitud"><div class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleSolicitud->FldCaption() ?></div></div></td>
	<?php } else { ?>
		<td><div><div id="elh_solicituddetalle_detalleSolicitud" class="solicituddetalle_detalleSolicitud">
			<div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleSolicitud->FldCaption() ?></span><span class="ewTableHeaderSort"><?php if ($solicituddetalle->detalleSolicitud->getSort() == "ASC") { ?><span class="caret ewSortUp"></span><?php } elseif ($solicituddetalle->detalleSolicitud->getSort() == "DESC") { ?><span class="caret"></span><?php } ?></span></div>
        </div></div></td>
	<?php } ?>
<?php } ?>		
<?php if ($solicituddetalle->detalleItem->Visible) { // detalleItem ?>
	<?php if ($solicituddetalle->SortUrl($solicituddetalle->detalleItem) == "") { ?>
		<td><div id="elh_solicituddetalle_detalleItem" class="solicituddetalle_detalleItem"><div class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleItem->FldCaption() ?></div></div></td>
	<?php } else { ?>
		<td><div><div id="elh_solicituddetalle_detalleItem" class="solicituddetalle_detalleItem">
			<div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleItem->FldCaption() ?></span><span class="ewTableHeaderSort"><?php if ($solicituddetalle->detalleItem->getSort() == "ASC") { ?><span class="caret ewSortUp"></span><?php } elseif ($solicituddetalle->detalleItem->getSort() == "DESC") { ?><span class="caret"></span><?php } ?></span></div>
        </div></div></td>
	<?php } ?>
<?php } ?>		
<?php if ($solicituddetalle->detalleProducto->Visible) { // detalleProducto ?>
	<?php if ($solicituddetalle->SortUrl($solicituddetalle->detalleProducto) == "") { ?>
		<td><div id="elh_solicituddetalle_detalleProducto" class="solicituddetalle_detalleProducto"><div class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleProducto->FldCaption() ?></div></div></td>
	<?php } else { ?>
		<td><div><div id="elh_solicituddetalle_detalleProducto" class="solicituddetalle_detalleProducto">
			<div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleProducto->FldCaption() ?></span><span class="ewTableHeaderSort"><?php if ($solicituddetalle->detalleProducto->getSort() == "ASC") { ?><span class="caret ewSortUp"></span><?php } elseif ($solicituddetalle->detalleProducto->getSort() == "DESC") { ?><span class="caret"></span><?php } ?></span></div>
        </div></div></td>
	<?php } ?>
<?php } ?>		
<?php if ($solicituddetalle->detalleUnidades->Visible) { // detalleUnidades ?>
	<?php if ($solicituddetalle->SortUrl($solicituddetalle->detalleUnidades) == "") { ?>
		<td><div id="elh_solicituddetalle_detalleUnidades" class="solicituddetalle_detalleUnidades"><div class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleUnidades->FldCaption() ?></div></div></td>
	<?php } else { ?>
		<td><div><div id="elh_solicituddetalle_detalleUnidades" class="solicituddetalle_detalleUnidades">
			<div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleUnidades->FldCaption() ?></span><span class="ewTableHeaderSort"><?php if ($solicituddetalle->detalleUnidades->getSort() == "ASC") { ?><span class="caret ewSortUp"></span><?php } elseif ($solicituddetalle->detalleUnidades->getSort() == "DESC") { ?><span class="caret"></span><?php } ?></span></div>
        </div></div></td>
	<?php } ?>
<?php } ?>		
<?php if ($solicituddetalle->detalleMetros->Visible) { // detalleMetros ?>
	<?php if ($solicituddetalle->SortUrl($solicituddetalle->detalleMetros) == "") { ?>
		<td><div id="elh_solicituddetalle_detalleMetros" class="solicituddetalle_detalleMetros"><div class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleMetros->FldCaption() ?></div></div></td>
	<?php } else { ?>
		<td><div><div id="elh_solicituddetalle_detalleMetros" class="solicituddetalle_detalleMetros">
			<div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleMetros->FldCaption() ?></span><span class="ewTableHeaderSort"><?php if ($solicituddetalle->detalleMetros->getSort() == "ASC") { ?><span class="caret ewSortUp"></span><?php } elseif ($solicituddetalle->detalleMetros->getSort() == "DESC") { ?><span class="caret"></span><?php } ?></span></div>
        </div></div></td>
	<?php } ?>
<?php } ?>		
<?php if ($solicituddetalle->detallePallets->Visible) { // detallePallets ?>
	<?php if ($solicituddetalle->SortUrl($solicituddetalle->detallePallets) == "") { ?>
		<td><div id="elh_solicituddetalle_detallePallets" class="solicituddetalle_detallePallets"><div class="ewTableHeaderCaption"><?php echo $solicituddetalle->detallePallets->FldCaption() ?></div></div></td>
	<?php } else { ?>
		<td><div><div id="elh_solicituddetalle_detallePallets" class="solicituddetalle_detallePallets">
			<div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><?php echo $solicituddetalle->detallePallets->FldCaption() ?></span><span class="ewTableHeaderSort"><?php if ($solicituddetalle->detallePallets->getSort() == "ASC") { ?><span class="caret ewSortUp"></span><?php } elseif ($solicituddetalle->detallePallets->getSort() == "DESC") { ?><span class="caret"></span><?php } ?></span></div>
        </div></div></td>
	<?php } ?>
<?php } ?>		
<?php if ($solicituddetalle->detallePaquetes->Visible) { // detallePaquetes ?>
	<?php if ($solicituddetalle->SortUrl($solicituddetalle->detallePaquetes) == "") { ?>
		<td><div id="elh_solicituddetalle_detallePaquetes" class="solicituddetalle_detallePaquetes"><div class="ewTableHeaderCaption"><?php echo $solicituddetalle->detallePaquetes->FldCaption() ?></div></div></td>
	<?php } else { ?>
		<td><div><div id="elh_solicituddetalle_detallePaquetes" class="solicituddetalle_detallePaquetes">
			<div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><?php echo $solicituddetalle->detallePaquetes->FldCaption() ?></span><span class="ewTableHeaderSort"><?php if ($solicituddetalle->detallePaquetes->getSort() == "ASC") { ?><span class="caret ewSortUp"></span><?php } elseif ($solicituddetalle->detallePaquetes->getSort() == "DESC") { ?><span class="caret"></span><?php } ?></span></div>
        </div></div></td>
	<?php } ?>
<?php } ?>		
<?php if ($solicituddetalle->detalleTipo->Visible) { // detalleTipo ?>
	<?php if ($solicituddetalle->SortUrl($solicituddetalle->detalleTipo) == "") { ?>
		<td><div id="elh_solicituddetalle_detalleTipo" class="solicituddetalle_detalleTipo"><div class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleTipo->FldCaption() ?></div></div></td>
	<?php } else { ?>
		<td><div><div id="elh_solicituddetalle_detalleTipo" class="solicituddetalle_detalleTipo">
			<div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleTipo->FldCaption() ?></span><span class="ewTableHeaderSort"><?php if ($solicituddetalle->detalleTipo->getSort() == "ASC") { ?><span class="caret ewSortUp"></span><?php } elseif ($solicituddetalle->detalleTipo->getSort() == "DESC") { ?><span class="caret"></span><?php } ?></span></div>
        </div></div></td>
	<?php } ?>
<?php } ?>		
<?php if ($solicituddetalle->detallePunto->Visible) { // detallePunto ?>
	<?php if ($solicituddetalle->SortUrl($solicituddetalle->detallePunto) == "") { ?>
		<td><div id="elh_solicituddetalle_detallePunto" class="solicituddetalle_detallePunto"><div class="ewTableHeaderCaption"><?php echo $solicituddetalle->detallePunto->FldCaption() ?></div></div></td>
	<?php } else { ?>
		<td><div><div id="elh_solicituddetalle_detallePunto" class="solicituddetalle_detallePunto">
			<div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><?php echo $solicituddetalle->detallePunto->FldCaption() ?></span><span class="ewTableHeaderSort"><?php if ($solicituddetalle->detallePunto->getSort() == "ASC") { ?><span class="caret ewSortUp"></span><?php } elseif ($solicituddetalle->detallePunto->getSort() == "DESC") { ?><span class="caret"></span><?php } ?></span></div>
        </div></div></td>
	<?php } ?>
<?php } ?>		
<?php if ($solicituddetalle->detalleNumero->Visible) { // detalleNumero ?>
	<?php if ($solicituddetalle->SortUrl($solicituddetalle->detalleNumero) == "") { ?>
		<td><div id="elh_solicituddetalle_detalleNumero" class="solicituddetalle_detalleNumero"><div class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleNumero->FldCaption() ?></div></div></td>
	<?php } else { ?>
		<td><div><div id="elh_solicituddetalle_detalleNumero" class="solicituddetalle_detalleNumero">
			<div class="ewTableHeaderBtn"><span class="ewTableHeaderCaption"><?php echo $solicituddetalle->detalleNumero->FldCaption() ?></span><span class="ewTableHeaderSort"><?php if ($solicituddetalle->detalleNumero->getSort() == "ASC") { ?><span class="caret ewSortUp"></span><?php } elseif ($solicituddetalle->detalleNumero->getSort() == "DESC") { ?><span class="caret"></span><?php } ?></span></div>
        </div></div></td>
	<?php } ?>
<?php } ?>		
<?php

// Render list options (header, right)
$solicituddetalle_grid->ListOptions->Render("header", "right");
?>
	</tr>
</thead>
<tbody>
<?php
$solicituddetalle_grid->StartRec = 1;
$solicituddetalle_grid->StopRec = $solicituddetalle_grid->TotalRecs; // Show all records

// Restore number of post back records
if ($objForm) {
	$objForm->Index = -1;
	if ($objForm->HasValue($solicituddetalle_grid->FormKeyCountName) && ($solicituddetalle->CurrentAction == "gridadd" || $solicituddetalle->CurrentAction == "gridedit" || $solicituddetalle->CurrentAction == "F")) {
		$solicituddetalle_grid->KeyCount = $objForm->GetValue($solicituddetalle_grid->FormKeyCountName);
		$solicituddetalle_grid->StopRec = $solicituddetalle_grid->StartRec + $solicituddetalle_grid->KeyCount - 1;
	}
}
$solicituddetalle_grid->RecCnt = $solicituddetalle_grid->StartRec - 1;
if ($solicituddetalle_grid->Recordset && !$solicituddetalle_grid->Recordset->EOF) {
	$solicituddetalle_grid->Recordset->MoveFirst();
	if (!$bSelectLimit && $solicituddetalle_grid->StartRec > 1)
		$solicituddetalle_grid->Recordset->Move($solicituddetalle_grid->StartRec - 1);
} elseif (!$solicituddetalle->AllowAddDeleteRow && $solicituddetalle_grid->StopRec == 0) {
	$solicituddetalle_grid->StopRec = $solicituddetalle->GridAddRowCount;
}

// Initialize aggregate
$solicituddetalle->RowType = EW_ROWTYPE_AGGREGATEINIT;
$solicituddetalle->ResetAttrs();
$solicituddetalle_grid->RenderRow();
if ($solicituddetalle->CurrentAction == "gridadd")
	$solicituddetalle_grid->RowIndex = 0;
if ($solicituddetalle->CurrentAction == "gridedit")
	$solicituddetalle_grid->RowIndex = 0;
while ($solicituddetalle_grid->RecCnt < $solicituddetalle_grid->StopRec) {
	$solicituddetalle_grid->RecCnt++;
	if (intval($solicituddetalle_grid->RecCnt) >= intval($solicituddetalle_grid->StartRec)) {
		$solicituddetalle_grid->RowCnt++;
		if ($solicituddetalle->CurrentAction == "gridadd" || $solicituddetalle->CurrentAction == "gridedit" || $solicituddetalle->CurrentAction == "F") {
			$solicituddetalle_grid->RowIndex++;
			$objForm->Index = $solicituddetalle_grid->RowIndex;
			if ($objForm->HasValue($solicituddetalle_grid->FormActionName))
				$solicituddetalle_grid->RowAction = strval($objForm->GetValue($solicituddetalle_grid->FormActionName));
			elseif ($solicituddetalle->CurrentAction == "gridadd")
				$solicituddetalle_grid->RowAction = "insert";
			else
				$solicituddetalle_grid->RowAction = "";
		}

		// Set up key count
		$solicituddetalle_grid->KeyCount = $solicituddetalle_grid->RowIndex;

		// Init row class and style
		$solicituddetalle->ResetAttrs();
		$solicituddetalle->CssClass = "";
		if ($solicituddetalle->CurrentAction == "gridadd") {
			if ($solicituddetalle->CurrentMode == "copy") {
				$solicituddetalle_grid->LoadRowValues($solicituddetalle_grid->Recordset); // Load row values
				$solicituddetalle_grid->SetRecordKey($solicituddetalle_grid->RowOldKey, $solicituddetalle_grid->Recordset); // Set old record key
			} else {
				$solicituddetalle_grid->LoadDefaultValues(); // Load default values
				$solicituddetalle_grid->RowOldKey = ""; // Clear old key value
			}
		} else {
			$solicituddetalle_grid->LoadRowValues($solicituddetalle_grid->Recordset); // Load row values
		}
		$solicituddetalle->RowType = EW_ROWTYPE_VIEW; // Render view
		if ($solicituddetalle->CurrentAction == "gridadd") // Grid add
			$solicituddetalle->RowType = EW_ROWTYPE_ADD; // Render add
		if ($solicituddetalle->CurrentAction == "gridadd" && $solicituddetalle->EventCancelled && !$objForm->HasValue("k_blankrow")) // Insert failed
			$solicituddetalle_grid->RestoreCurrentRowFormValues($solicituddetalle_grid->RowIndex); // Restore form values
		if ($solicituddetalle->CurrentAction == "gridedit") { // Grid edit
			if ($solicituddetalle->EventCancelled) {
				$solicituddetalle_grid->RestoreCurrentRowFormValues($solicituddetalle_grid->RowIndex); // Restore form values
			}
			if ($solicituddetalle_grid->RowAction == "insert")
				$solicituddetalle->RowType = EW_ROWTYPE_ADD; // Render add
			else
				$solicituddetalle->RowType = EW_ROWTYPE_EDIT; // Render edit
		}
		if ($solicituddetalle->CurrentAction == "gridedit" && ($solicituddetalle->RowType == EW_ROWTYPE_EDIT || $solicituddetalle->RowType == EW_ROWTYPE_ADD) && $solicituddetalle->EventCancelled) // Update failed
			$solicituddetalle_grid->RestoreCurrentRowFormValues($solicituddetalle_grid->RowIndex); // Restore form values
		if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) // Edit row
			$solicituddetalle_grid->EditRowCnt++;
		if ($solicituddetalle->CurrentAction == "F") // Confirm row
			$solicituddetalle_grid->RestoreCurrentRowFormValues($solicituddetalle_grid->RowIndex); // Restore form values

		// Set up row id / data-rowindex
		$solicituddetalle->RowAttrs = array_merge($solicituddetalle->RowAttrs, array('data-rowindex'=>$solicituddetalle_grid->RowCnt, 'id'=>'r' . $solicituddetalle_grid->RowCnt . '_solicituddetalle', 'data-rowtype'=>$solicituddetalle->RowType));

		// Render row
		$solicituddetalle_grid->RenderRow();

		// Render list options
		$solicituddetalle_grid->RenderListOptions();

		// Skip delete row / empty row for confirm page
		if ($solicituddetalle_grid->RowAction <> "delete" && $solicituddetalle_grid->RowAction <> "insertdelete" && !($solicituddetalle_grid->RowAction == "insert" && $solicituddetalle->CurrentAction == "F" && $solicituddetalle_grid->EmptyRow())) {
?>
	<tr<?php echo $solicituddetalle->RowAttributes() ?>>
<?php

// Render list options (body, left)
$solicituddetalle_grid->ListOptions->Render("body", "left", $solicituddetalle_grid->RowCnt);
?>
	<?php if ($solicituddetalle->detalleSolicitud->Visible) { // detalleSolicitud ?>
		<td<?php echo $solicituddetalle->detalleSolicitud->CellAttributes() ?>>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<?php if ($solicituddetalle->detalleSolicitud->getSessionValue() <> "") { ?>
<span<?php echo $solicituddetalle->detalleSolicitud->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleSolicitud->ListViewValue() ?></span>
<input type="hidden" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleSolicitud->CurrentValue) ?>">
<?php } else { ?>
<input type="text" data-field="x_detalleSolicitud" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" size="30" placeholder="<?php echo $solicituddetalle->detalleSolicitud->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleSolicitud->EditValue ?>"<?php echo $solicituddetalle->detalleSolicitud->EditAttributes() ?>>
<?php } ?>
<input type="hidden" data-field="x_detalleSolicitud" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleSolicitud->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<?php if ($solicituddetalle->detalleSolicitud->getSessionValue() <> "") { ?>
<span<?php echo $solicituddetalle->detalleSolicitud->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleSolicitud->ListViewValue() ?></span>
<input type="hidden" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleSolicitud->CurrentValue) ?>">
<?php } else { ?>
<input type="text" data-field="x_detalleSolicitud" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" size="30" placeholder="<?php echo $solicituddetalle->detalleSolicitud->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleSolicitud->EditValue ?>"<?php echo $solicituddetalle->detalleSolicitud->EditAttributes() ?>>
<?php } ?>
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<span<?php echo $solicituddetalle->detalleSolicitud->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleSolicitud->ListViewValue() ?></span>
<input type="hidden" data-field="x_detalleSolicitud" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleSolicitud->FormValue) ?>">
<input type="hidden" data-field="x_detalleSolicitud" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleSolicitud->OldValue) ?>">
<?php } ?>
<a id="<?php echo $solicituddetalle_grid->PageObjName . "_row_" . $solicituddetalle_grid->RowCnt ?>"></a></td>
	<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<input type="hidden" data-field="x_detalleId" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleId" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleId" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleId->CurrentValue) ?>">
<input type="hidden" data-field="x_detalleId" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleId" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleId" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleId->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT || $solicituddetalle->CurrentMode == "edit") { ?>
<input type="hidden" data-field="x_detalleId" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleId" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleId" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleId->CurrentValue) ?>">
<?php } ?>
	<?php if ($solicituddetalle->detalleItem->Visible) { // detalleItem ?>
		<td<?php echo $solicituddetalle->detalleItem->CellAttributes() ?>>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleItem" class="control-group solicituddetalle_detalleItem">
<input type="text" data-field="x_detalleItem" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" size="30" placeholder="<?php echo $solicituddetalle->detalleItem->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleItem->EditValue ?>"<?php echo $solicituddetalle->detalleItem->EditAttributes() ?>>
</span>
<input type="hidden" data-field="x_detalleItem" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleItem->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleItem" class="control-group solicituddetalle_detalleItem">
<input type="text" data-field="x_detalleItem" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" size="30" placeholder="<?php echo $solicituddetalle->detalleItem->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleItem->EditValue ?>"<?php echo $solicituddetalle->detalleItem->EditAttributes() ?>>
</span>
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<span<?php echo $solicituddetalle->detalleItem->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleItem->ListViewValue() ?></span>
<input type="hidden" data-field="x_detalleItem" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleItem->FormValue) ?>">
<input type="hidden" data-field="x_detalleItem" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleItem->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleProducto->Visible) { // detalleProducto ?>
		<td<?php echo $solicituddetalle->detalleProducto->CellAttributes() ?>>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleProducto" class="control-group solicituddetalle_detalleProducto">
<select data-field="x_detalleProducto" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto"<?php echo $solicituddetalle->detalleProducto->EditAttributes() ?>>
<?php
if (is_array($solicituddetalle->detalleProducto->EditValue)) {
	$arwrk = $solicituddetalle->detalleProducto->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($solicituddetalle->detalleProducto->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
<?php if ($arwrk[$rowcntwrk][2] <> "") { ?>
<?php echo ew_ValueSeparator(1,$solicituddetalle->detalleProducto) ?><?php echo $arwrk[$rowcntwrk][2] ?>
<?php } ?>
</option>
<?php
	}
}
if (@$emptywrk) $solicituddetalle->detalleProducto->OldValue = "";
?>
</select>
<script type="text/javascript">
fsolicituddetallegrid.Lists["x_detalleProducto"].Options = <?php echo (is_array($solicituddetalle->detalleProducto->EditValue)) ? ew_ArrayToJson($solicituddetalle->detalleProducto->EditValue, 1) : "[]" ?>;
</script>
</span>
<input type="hidden" data-field="x_detalleProducto" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleProducto->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleProducto" class="control-group solicituddetalle_detalleProducto">
<select data-field="x_detalleProducto" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto"<?php echo $solicituddetalle->detalleProducto->EditAttributes() ?>>
<?php
if (is_array($solicituddetalle->detalleProducto->EditValue)) {
	$arwrk = $solicituddetalle->detalleProducto->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($solicituddetalle->detalleProducto->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
<?php if ($arwrk[$rowcntwrk][2] <> "") { ?>
<?php echo ew_ValueSeparator(1,$solicituddetalle->detalleProducto) ?><?php echo $arwrk[$rowcntwrk][2] ?>
<?php } ?>
</option>
<?php
	}
}
if (@$emptywrk) $solicituddetalle->detalleProducto->OldValue = "";
?>
</select>
<script type="text/javascript">
fsolicituddetallegrid.Lists["x_detalleProducto"].Options = <?php echo (is_array($solicituddetalle->detalleProducto->EditValue)) ? ew_ArrayToJson($solicituddetalle->detalleProducto->EditValue, 1) : "[]" ?>;
</script>
</span>
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<span<?php echo $solicituddetalle->detalleProducto->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleProducto->ListViewValue() ?></span>
<input type="hidden" data-field="x_detalleProducto" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleProducto->FormValue) ?>">
<input type="hidden" data-field="x_detalleProducto" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleProducto->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleUnidades->Visible) { // detalleUnidades ?>
		<td<?php echo $solicituddetalle->detalleUnidades->CellAttributes() ?>>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleUnidades" class="control-group solicituddetalle_detalleUnidades">
<input type="text" data-field="x_detalleUnidades" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" size="30" placeholder="<?php echo $solicituddetalle->detalleUnidades->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleUnidades->EditValue ?>"<?php echo $solicituddetalle->detalleUnidades->EditAttributes() ?>>
</span>
<input type="hidden" data-field="x_detalleUnidades" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleUnidades->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleUnidades" class="control-group solicituddetalle_detalleUnidades">
<input type="text" data-field="x_detalleUnidades" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" size="30" placeholder="<?php echo $solicituddetalle->detalleUnidades->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleUnidades->EditValue ?>"<?php echo $solicituddetalle->detalleUnidades->EditAttributes() ?>>
</span>
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<span<?php echo $solicituddetalle->detalleUnidades->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleUnidades->ListViewValue() ?></span>
<input type="hidden" data-field="x_detalleUnidades" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleUnidades->FormValue) ?>">
<input type="hidden" data-field="x_detalleUnidades" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleUnidades->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleMetros->Visible) { // detalleMetros ?>
		<td<?php echo $solicituddetalle->detalleMetros->CellAttributes() ?>>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleMetros" class="control-group solicituddetalle_detalleMetros">
<input type="text" data-field="x_detalleMetros" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" size="30" placeholder="<?php echo $solicituddetalle->detalleMetros->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleMetros->EditValue ?>"<?php echo $solicituddetalle->detalleMetros->EditAttributes() ?>>
</span>
<input type="hidden" data-field="x_detalleMetros" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleMetros->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleMetros" class="control-group solicituddetalle_detalleMetros">
<input type="text" data-field="x_detalleMetros" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" size="30" placeholder="<?php echo $solicituddetalle->detalleMetros->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleMetros->EditValue ?>"<?php echo $solicituddetalle->detalleMetros->EditAttributes() ?>>
</span>
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<span<?php echo $solicituddetalle->detalleMetros->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleMetros->ListViewValue() ?></span>
<input type="hidden" data-field="x_detalleMetros" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleMetros->FormValue) ?>">
<input type="hidden" data-field="x_detalleMetros" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleMetros->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detallePallets->Visible) { // detallePallets ?>
		<td<?php echo $solicituddetalle->detallePallets->CellAttributes() ?>>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detallePallets" class="control-group solicituddetalle_detallePallets">
<input type="text" data-field="x_detallePallets" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" size="30" placeholder="<?php echo $solicituddetalle->detallePallets->PlaceHolder ?>" value="<?php echo $solicituddetalle->detallePallets->EditValue ?>"<?php echo $solicituddetalle->detallePallets->EditAttributes() ?>>
</span>
<input type="hidden" data-field="x_detallePallets" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePallets->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detallePallets" class="control-group solicituddetalle_detallePallets">
<input type="text" data-field="x_detallePallets" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" size="30" placeholder="<?php echo $solicituddetalle->detallePallets->PlaceHolder ?>" value="<?php echo $solicituddetalle->detallePallets->EditValue ?>"<?php echo $solicituddetalle->detallePallets->EditAttributes() ?>>
</span>
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<span<?php echo $solicituddetalle->detallePallets->ViewAttributes() ?>>
<?php echo $solicituddetalle->detallePallets->ListViewValue() ?></span>
<input type="hidden" data-field="x_detallePallets" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePallets->FormValue) ?>">
<input type="hidden" data-field="x_detallePallets" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePallets->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detallePaquetes->Visible) { // detallePaquetes ?>
		<td<?php echo $solicituddetalle->detallePaquetes->CellAttributes() ?>>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detallePaquetes" class="control-group solicituddetalle_detallePaquetes">
<input type="text" data-field="x_detallePaquetes" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" size="30" placeholder="<?php echo $solicituddetalle->detallePaquetes->PlaceHolder ?>" value="<?php echo $solicituddetalle->detallePaquetes->EditValue ?>"<?php echo $solicituddetalle->detallePaquetes->EditAttributes() ?>>
</span>
<input type="hidden" data-field="x_detallePaquetes" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePaquetes->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detallePaquetes" class="control-group solicituddetalle_detallePaquetes">
<input type="text" data-field="x_detallePaquetes" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" size="30" placeholder="<?php echo $solicituddetalle->detallePaquetes->PlaceHolder ?>" value="<?php echo $solicituddetalle->detallePaquetes->EditValue ?>"<?php echo $solicituddetalle->detallePaquetes->EditAttributes() ?>>
</span>
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<span<?php echo $solicituddetalle->detallePaquetes->ViewAttributes() ?>>
<?php echo $solicituddetalle->detallePaquetes->ListViewValue() ?></span>
<input type="hidden" data-field="x_detallePaquetes" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePaquetes->FormValue) ?>">
<input type="hidden" data-field="x_detallePaquetes" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePaquetes->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleTipo->Visible) { // detalleTipo ?>
		<td<?php echo $solicituddetalle->detalleTipo->CellAttributes() ?>>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleTipo" class="control-group solicituddetalle_detalleTipo">
<select data-field="x_detalleTipo" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo"<?php echo $solicituddetalle->detalleTipo->EditAttributes() ?>>
<?php
if (is_array($solicituddetalle->detalleTipo->EditValue)) {
	$arwrk = $solicituddetalle->detalleTipo->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($solicituddetalle->detalleTipo->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
</option>
<?php
	}
}
if (@$emptywrk) $solicituddetalle->detalleTipo->OldValue = "";
?>
</select>
</span>
<input type="hidden" data-field="x_detalleTipo" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleTipo->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleTipo" class="control-group solicituddetalle_detalleTipo">
<select data-field="x_detalleTipo" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo"<?php echo $solicituddetalle->detalleTipo->EditAttributes() ?>>
<?php
if (is_array($solicituddetalle->detalleTipo->EditValue)) {
	$arwrk = $solicituddetalle->detalleTipo->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($solicituddetalle->detalleTipo->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
</option>
<?php
	}
}
if (@$emptywrk) $solicituddetalle->detalleTipo->OldValue = "";
?>
</select>
</span>
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<span<?php echo $solicituddetalle->detalleTipo->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleTipo->ListViewValue() ?></span>
<input type="hidden" data-field="x_detalleTipo" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleTipo->FormValue) ?>">
<input type="hidden" data-field="x_detalleTipo" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleTipo->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detallePunto->Visible) { // detallePunto ?>
		<td<?php echo $solicituddetalle->detallePunto->CellAttributes() ?>>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detallePunto" class="control-group solicituddetalle_detallePunto">
<input type="text" data-field="x_detallePunto" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" size="30" placeholder="<?php echo $solicituddetalle->detallePunto->PlaceHolder ?>" value="<?php echo $solicituddetalle->detallePunto->EditValue ?>"<?php echo $solicituddetalle->detallePunto->EditAttributes() ?>>
</span>
<input type="hidden" data-field="x_detallePunto" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePunto->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detallePunto" class="control-group solicituddetalle_detallePunto">
<input type="text" data-field="x_detallePunto" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" size="30" placeholder="<?php echo $solicituddetalle->detallePunto->PlaceHolder ?>" value="<?php echo $solicituddetalle->detallePunto->EditValue ?>"<?php echo $solicituddetalle->detallePunto->EditAttributes() ?>>
</span>
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<span<?php echo $solicituddetalle->detallePunto->ViewAttributes() ?>>
<?php echo $solicituddetalle->detallePunto->ListViewValue() ?></span>
<input type="hidden" data-field="x_detallePunto" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePunto->FormValue) ?>">
<input type="hidden" data-field="x_detallePunto" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePunto->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleNumero->Visible) { // detalleNumero ?>
		<td<?php echo $solicituddetalle->detalleNumero->CellAttributes() ?>>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD) { // Add record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleNumero" class="control-group solicituddetalle_detalleNumero">
<input type="text" data-field="x_detalleNumero" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" size="30" placeholder="<?php echo $solicituddetalle->detalleNumero->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleNumero->EditValue ?>"<?php echo $solicituddetalle->detalleNumero->EditAttributes() ?>>
</span>
<input type="hidden" data-field="x_detalleNumero" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleNumero->OldValue) ?>">
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_EDIT) { // Edit record ?>
<span id="el<?php echo $solicituddetalle_grid->RowCnt ?>_solicituddetalle_detalleNumero" class="control-group solicituddetalle_detalleNumero">
<input type="text" data-field="x_detalleNumero" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" size="30" placeholder="<?php echo $solicituddetalle->detalleNumero->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleNumero->EditValue ?>"<?php echo $solicituddetalle->detalleNumero->EditAttributes() ?>>
</span>
<?php } ?>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_VIEW) { // View record ?>
<span<?php echo $solicituddetalle->detalleNumero->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleNumero->ListViewValue() ?></span>
<input type="hidden" data-field="x_detalleNumero" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleNumero->FormValue) ?>">
<input type="hidden" data-field="x_detalleNumero" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleNumero->OldValue) ?>">
<?php } ?>
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$solicituddetalle_grid->ListOptions->Render("body", "right", $solicituddetalle_grid->RowCnt);
?>
	</tr>
<?php if ($solicituddetalle->RowType == EW_ROWTYPE_ADD || $solicituddetalle->RowType == EW_ROWTYPE_EDIT) { ?>
<script type="text/javascript">
fsolicituddetallegrid.UpdateOpts(<?php echo $solicituddetalle_grid->RowIndex ?>);
</script>
<?php } ?>
<?php
	}
	} // End delete row checking
	if ($solicituddetalle->CurrentAction <> "gridadd" || $solicituddetalle->CurrentMode == "copy")
		if (!$solicituddetalle_grid->Recordset->EOF) $solicituddetalle_grid->Recordset->MoveNext();
}
?>
<?php
	if ($solicituddetalle->CurrentMode == "add" || $solicituddetalle->CurrentMode == "copy" || $solicituddetalle->CurrentMode == "edit") {
		$solicituddetalle_grid->RowIndex = '$rowindex$';
		$solicituddetalle_grid->LoadDefaultValues();

		// Set row properties
		$solicituddetalle->ResetAttrs();
		$solicituddetalle->RowAttrs = array_merge($solicituddetalle->RowAttrs, array('data-rowindex'=>$solicituddetalle_grid->RowIndex, 'id'=>'r0_solicituddetalle', 'data-rowtype'=>EW_ROWTYPE_ADD));
		ew_AppendClass($solicituddetalle->RowAttrs["class"], "ewTemplate");
		$solicituddetalle->RowType = EW_ROWTYPE_ADD;

		// Render row
		$solicituddetalle_grid->RenderRow();

		// Render list options
		$solicituddetalle_grid->RenderListOptions();
		$solicituddetalle_grid->StartRowCnt = 0;
?>
	<tr<?php echo $solicituddetalle->RowAttributes() ?>>
<?php

// Render list options (body, left)
$solicituddetalle_grid->ListOptions->Render("body", "left", $solicituddetalle_grid->RowIndex);
?>
	<?php if ($solicituddetalle->detalleSolicitud->Visible) { // detalleSolicitud ?>
		<td>
<?php if ($solicituddetalle->CurrentAction <> "F") { ?>
<?php if ($solicituddetalle->detalleSolicitud->getSessionValue() <> "") { ?>
<span<?php echo $solicituddetalle->detalleSolicitud->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleSolicitud->ListViewValue() ?></span>
<input type="hidden" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleSolicitud->CurrentValue) ?>">
<?php } else { ?>
<input type="text" data-field="x_detalleSolicitud" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" size="30" placeholder="<?php echo $solicituddetalle->detalleSolicitud->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleSolicitud->EditValue ?>"<?php echo $solicituddetalle->detalleSolicitud->EditAttributes() ?>>
<?php } ?>
<?php } else { ?>
<span<?php echo $solicituddetalle->detalleSolicitud->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleSolicitud->ViewValue ?></span>
<input type="hidden" data-field="x_detalleSolicitud" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleSolicitud->FormValue) ?>">
<?php } ?>
<input type="hidden" data-field="x_detalleSolicitud" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleSolicitud" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleSolicitud->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleItem->Visible) { // detalleItem ?>
		<td>
<?php if ($solicituddetalle->CurrentAction <> "F") { ?>
<span id="el$rowindex$_solicituddetalle_detalleItem" class="control-group solicituddetalle_detalleItem">
<input type="text" data-field="x_detalleItem" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" size="30" placeholder="<?php echo $solicituddetalle->detalleItem->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleItem->EditValue ?>"<?php echo $solicituddetalle->detalleItem->EditAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_solicituddetalle_detalleItem" class="control-group solicituddetalle_detalleItem">
<span<?php echo $solicituddetalle->detalleItem->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleItem->ViewValue ?></span>
</span>
<input type="hidden" data-field="x_detalleItem" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleItem->FormValue) ?>">
<?php } ?>
<input type="hidden" data-field="x_detalleItem" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleItem" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleItem->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleProducto->Visible) { // detalleProducto ?>
		<td>
<?php if ($solicituddetalle->CurrentAction <> "F") { ?>
<span id="el$rowindex$_solicituddetalle_detalleProducto" class="control-group solicituddetalle_detalleProducto">
<select data-field="x_detalleProducto" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto"<?php echo $solicituddetalle->detalleProducto->EditAttributes() ?>>
<?php
if (is_array($solicituddetalle->detalleProducto->EditValue)) {
	$arwrk = $solicituddetalle->detalleProducto->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($solicituddetalle->detalleProducto->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
<?php if ($arwrk[$rowcntwrk][2] <> "") { ?>
<?php echo ew_ValueSeparator(1,$solicituddetalle->detalleProducto) ?><?php echo $arwrk[$rowcntwrk][2] ?>
<?php } ?>
</option>
<?php
	}
}
if (@$emptywrk) $solicituddetalle->detalleProducto->OldValue = "";
?>
</select>
<script type="text/javascript">
fsolicituddetallegrid.Lists["x_detalleProducto"].Options = <?php echo (is_array($solicituddetalle->detalleProducto->EditValue)) ? ew_ArrayToJson($solicituddetalle->detalleProducto->EditValue, 1) : "[]" ?>;
</script>
</span>
<?php } else { ?>
<span id="el$rowindex$_solicituddetalle_detalleProducto" class="control-group solicituddetalle_detalleProducto">
<span<?php echo $solicituddetalle->detalleProducto->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleProducto->ViewValue ?></span>
</span>
<input type="hidden" data-field="x_detalleProducto" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleProducto->FormValue) ?>">
<?php } ?>
<input type="hidden" data-field="x_detalleProducto" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleProducto" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleProducto->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleUnidades->Visible) { // detalleUnidades ?>
		<td>
<?php if ($solicituddetalle->CurrentAction <> "F") { ?>
<span id="el$rowindex$_solicituddetalle_detalleUnidades" class="control-group solicituddetalle_detalleUnidades">
<input type="text" data-field="x_detalleUnidades" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" size="30" placeholder="<?php echo $solicituddetalle->detalleUnidades->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleUnidades->EditValue ?>"<?php echo $solicituddetalle->detalleUnidades->EditAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_solicituddetalle_detalleUnidades" class="control-group solicituddetalle_detalleUnidades">
<span<?php echo $solicituddetalle->detalleUnidades->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleUnidades->ViewValue ?></span>
</span>
<input type="hidden" data-field="x_detalleUnidades" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleUnidades->FormValue) ?>">
<?php } ?>
<input type="hidden" data-field="x_detalleUnidades" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleUnidades" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleUnidades->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleMetros->Visible) { // detalleMetros ?>
		<td>
<?php if ($solicituddetalle->CurrentAction <> "F") { ?>
<span id="el$rowindex$_solicituddetalle_detalleMetros" class="control-group solicituddetalle_detalleMetros">
<input type="text" data-field="x_detalleMetros" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" size="30" placeholder="<?php echo $solicituddetalle->detalleMetros->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleMetros->EditValue ?>"<?php echo $solicituddetalle->detalleMetros->EditAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_solicituddetalle_detalleMetros" class="control-group solicituddetalle_detalleMetros">
<span<?php echo $solicituddetalle->detalleMetros->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleMetros->ViewValue ?></span>
</span>
<input type="hidden" data-field="x_detalleMetros" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleMetros->FormValue) ?>">
<?php } ?>
<input type="hidden" data-field="x_detalleMetros" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleMetros" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleMetros->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detallePallets->Visible) { // detallePallets ?>
		<td>
<?php if ($solicituddetalle->CurrentAction <> "F") { ?>
<span id="el$rowindex$_solicituddetalle_detallePallets" class="control-group solicituddetalle_detallePallets">
<input type="text" data-field="x_detallePallets" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" size="30" placeholder="<?php echo $solicituddetalle->detallePallets->PlaceHolder ?>" value="<?php echo $solicituddetalle->detallePallets->EditValue ?>"<?php echo $solicituddetalle->detallePallets->EditAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_solicituddetalle_detallePallets" class="control-group solicituddetalle_detallePallets">
<span<?php echo $solicituddetalle->detallePallets->ViewAttributes() ?>>
<?php echo $solicituddetalle->detallePallets->ViewValue ?></span>
</span>
<input type="hidden" data-field="x_detallePallets" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePallets->FormValue) ?>">
<?php } ?>
<input type="hidden" data-field="x_detallePallets" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePallets" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePallets->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detallePaquetes->Visible) { // detallePaquetes ?>
		<td>
<?php if ($solicituddetalle->CurrentAction <> "F") { ?>
<span id="el$rowindex$_solicituddetalle_detallePaquetes" class="control-group solicituddetalle_detallePaquetes">
<input type="text" data-field="x_detallePaquetes" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" size="30" placeholder="<?php echo $solicituddetalle->detallePaquetes->PlaceHolder ?>" value="<?php echo $solicituddetalle->detallePaquetes->EditValue ?>"<?php echo $solicituddetalle->detallePaquetes->EditAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_solicituddetalle_detallePaquetes" class="control-group solicituddetalle_detallePaquetes">
<span<?php echo $solicituddetalle->detallePaquetes->ViewAttributes() ?>>
<?php echo $solicituddetalle->detallePaquetes->ViewValue ?></span>
</span>
<input type="hidden" data-field="x_detallePaquetes" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePaquetes->FormValue) ?>">
<?php } ?>
<input type="hidden" data-field="x_detallePaquetes" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePaquetes" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePaquetes->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleTipo->Visible) { // detalleTipo ?>
		<td>
<?php if ($solicituddetalle->CurrentAction <> "F") { ?>
<span id="el$rowindex$_solicituddetalle_detalleTipo" class="control-group solicituddetalle_detalleTipo">
<select data-field="x_detalleTipo" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo"<?php echo $solicituddetalle->detalleTipo->EditAttributes() ?>>
<?php
if (is_array($solicituddetalle->detalleTipo->EditValue)) {
	$arwrk = $solicituddetalle->detalleTipo->EditValue;
	$rowswrk = count($arwrk);
	$emptywrk = TRUE;
	for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
		$selwrk = (strval($solicituddetalle->detalleTipo->CurrentValue) == strval($arwrk[$rowcntwrk][0])) ? " selected=\"selected\"" : "";
		if ($selwrk <> "") $emptywrk = FALSE;
?>
<option value="<?php echo ew_HtmlEncode($arwrk[$rowcntwrk][0]) ?>"<?php echo $selwrk ?>>
<?php echo $arwrk[$rowcntwrk][1] ?>
</option>
<?php
	}
}
if (@$emptywrk) $solicituddetalle->detalleTipo->OldValue = "";
?>
</select>
</span>
<?php } else { ?>
<span id="el$rowindex$_solicituddetalle_detalleTipo" class="control-group solicituddetalle_detalleTipo">
<span<?php echo $solicituddetalle->detalleTipo->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleTipo->ViewValue ?></span>
</span>
<input type="hidden" data-field="x_detalleTipo" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleTipo->FormValue) ?>">
<?php } ?>
<input type="hidden" data-field="x_detalleTipo" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleTipo" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleTipo->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detallePunto->Visible) { // detallePunto ?>
		<td>
<?php if ($solicituddetalle->CurrentAction <> "F") { ?>
<span id="el$rowindex$_solicituddetalle_detallePunto" class="control-group solicituddetalle_detallePunto">
<input type="text" data-field="x_detallePunto" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" size="30" placeholder="<?php echo $solicituddetalle->detallePunto->PlaceHolder ?>" value="<?php echo $solicituddetalle->detallePunto->EditValue ?>"<?php echo $solicituddetalle->detallePunto->EditAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_solicituddetalle_detallePunto" class="control-group solicituddetalle_detallePunto">
<span<?php echo $solicituddetalle->detallePunto->ViewAttributes() ?>>
<?php echo $solicituddetalle->detallePunto->ViewValue ?></span>
</span>
<input type="hidden" data-field="x_detallePunto" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePunto->FormValue) ?>">
<?php } ?>
<input type="hidden" data-field="x_detallePunto" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detallePunto" value="<?php echo ew_HtmlEncode($solicituddetalle->detallePunto->OldValue) ?>">
</td>
	<?php } ?>
	<?php if ($solicituddetalle->detalleNumero->Visible) { // detalleNumero ?>
		<td>
<?php if ($solicituddetalle->CurrentAction <> "F") { ?>
<span id="el$rowindex$_solicituddetalle_detalleNumero" class="control-group solicituddetalle_detalleNumero">
<input type="text" data-field="x_detalleNumero" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" size="30" placeholder="<?php echo $solicituddetalle->detalleNumero->PlaceHolder ?>" value="<?php echo $solicituddetalle->detalleNumero->EditValue ?>"<?php echo $solicituddetalle->detalleNumero->EditAttributes() ?>>
</span>
<?php } else { ?>
<span id="el$rowindex$_solicituddetalle_detalleNumero" class="control-group solicituddetalle_detalleNumero">
<span<?php echo $solicituddetalle->detalleNumero->ViewAttributes() ?>>
<?php echo $solicituddetalle->detalleNumero->ViewValue ?></span>
</span>
<input type="hidden" data-field="x_detalleNumero" name="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" id="x<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleNumero->FormValue) ?>">
<?php } ?>
<input type="hidden" data-field="x_detalleNumero" name="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" id="o<?php echo $solicituddetalle_grid->RowIndex ?>_detalleNumero" value="<?php echo ew_HtmlEncode($solicituddetalle->detalleNumero->OldValue) ?>">
</td>
	<?php } ?>
<?php

// Render list options (body, right)
$solicituddetalle_grid->ListOptions->Render("body", "right", $solicituddetalle_grid->RowCnt);
?>
<script type="text/javascript">
fsolicituddetallegrid.UpdateOpts(<?php echo $solicituddetalle_grid->RowIndex ?>);
</script>
	</tr>
<?php
}
?>
</tbody>
</table>
<?php if ($solicituddetalle->CurrentMode == "add" || $solicituddetalle->CurrentMode == "copy") { ?>
<input type="hidden" name="a_list" id="a_list" value="gridinsert">
<input type="hidden" name="<?php echo $solicituddetalle_grid->FormKeyCountName ?>" id="<?php echo $solicituddetalle_grid->FormKeyCountName ?>" value="<?php echo $solicituddetalle_grid->KeyCount ?>">
<?php echo $solicituddetalle_grid->MultiSelectKey ?>
<?php } ?>
<?php if ($solicituddetalle->CurrentMode == "edit") { ?>
<input type="hidden" name="a_list" id="a_list" value="gridupdate">
<input type="hidden" name="<?php echo $solicituddetalle_grid->FormKeyCountName ?>" id="<?php echo $solicituddetalle_grid->FormKeyCountName ?>" value="<?php echo $solicituddetalle_grid->KeyCount ?>">
<?php echo $solicituddetalle_grid->MultiSelectKey ?>
<?php } ?>
<?php if ($solicituddetalle->CurrentMode == "") { ?>
<input type="hidden" name="a_list" id="a_list" value="">
<?php } ?>
<input type="hidden" name="detailpage" value="fsolicituddetallegrid">
</div>
<?php

// Close recordset
if ($solicituddetalle_grid->Recordset)
	$solicituddetalle_grid->Recordset->Close();
?>
<?php if ($solicituddetalle_grid->ShowOtherOptions) { ?>
<div class="ewGridLowerPanel ewListOtherOptions">
<?php
	foreach ($solicituddetalle_grid->OtherOptions as &$option)
		$option->Render("body", "bottom");
?>
</div>
<?php } ?>
</div>
</td></tr></table>
<?php if ($solicituddetalle->Export == "") { ?>
<script type="text/javascript">
fsolicituddetallegrid.Init();
<?php if (EW_MOBILE_REFLOW && ew_IsMobile()) { ?>
ew_Reflow();
<?php } ?>
</script>
<?php } ?>
<?php
$solicituddetalle_grid->ShowPageFooter();
if (EW_DEBUG_ENABLED)
	echo ew_DebugMsg();
?>
<?php
$solicituddetalle_grid->Page_Terminate();
?>
